import 'dart:typed_data';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'mdict_flutter_plugin_method_channel.dart';

abstract class MdictFlutterPluginPlatform extends PlatformInterface {
  /// Constructs a MdictFlutterPluginPlatform.
  MdictFlutterPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static MdictFlutterPluginPlatform _instance = MethodChannelMdictFlutterPlugin();

  /// The default instance of [MdictFlutterPluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelMdictFlutterPlugin].
  static MdictFlutterPluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [MdictFlutterPluginPlatform] when
  /// they register themselves.
  static set instance(MdictFlutterPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> lookforMdict(String path, String word) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> releaseMdict(String path) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<int?> getSizeMdict(String path) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<List<String>?> suggestMdict(String path, String word, String maxCount) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<Uint8List?> getResourceMdict(String path, url) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> getNameMdict(String path) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }
}
